<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">

	<h:head>
	     <title>商品目录信息</title>
	     <style type="text/css">
	         .ui-widget {
	             font-size: 90%;
	         }
	     </style>
	 </h:head>

<h:form>
	<h:panelGrid columns="2" cellpadding="5">

        <p:outputLabel for="id" value="id: " rendered="#{not empty goodsTypeForm.id}"/>
        <p:inputText id="id" value="#{goodsTypeForm.id}" rendered="#{not empty goodsTypeForm.id}" disabled="true"/>

        <p:outputLabel for="name" value="name: " />
        <p:inputText id="name" value="#{goodsTypeForm.name}" size="20" />

        <p:outputLabel for="delFlg" value="delFlg:" />
        <p:selectBooleanButton id="delFlg" value="#{goodsTypeForm.delFlg}" onLabel="Yes" offLabel="No" onIcon="ui-icon-check" offIcon="ui-icon-close" style="width:60px" />

        <p:commandButton value="登录" actionListener="#{goodsTypeBean.registerGoodsType}" rendered="#{empty goodsTypeForm.id}">
        	<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
        </p:commandButton>
        <p:commandButton value="更新" actionListener="#{goodsTypeBean.updateGoodsType}" rendered="#{not empty goodsTypeForm.id}">
        	<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
        </p:commandButton>

    </h:panelGrid>

	<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
        <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
        <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
    </p:confirmDialog>
</h:form>

</ui:composition>